Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport "Help implement Metals' infer expected type feature" to LTS #22108

Merged
merged 8 commits into from
Dec 4, 2024

Conversation

WojciechMazur
Copy link
Contributor

Backports #21390 to the 3.3.5.

PR submitted by the release tooling.
[skip ci]

kasiaMarek and others added 8 commits December 3, 2024 20:59
TypeComparer.explaining is like TypeComparer.explained, but instead of
just returning the trace, returns the result, still allowing the trace
to be accessed via .lastTrace, as exemplified by implementing
TypeComparer.explained in terms of TypeComparer.explaining.

Also add, but leave commented out the call of, a trace.dumpStack, which
is like Thread.dumpStack(), but outputing to System.out, like all our
tracing does - so the two don't interact when unbuffering onto the
terminal.  Also, we can do customisations like filtering out stack
elements, limiting the stack.

[Cherry-picked 5aaea2f][modified]
But keep the extraction of the instDecision logic, and keep the tests
cases I used in studying this change.

Also simplify and update InstantiateModel.  Martin had tweaked my i14218
fix to make it more conservative: in the (NN, UU) case (i.e. no inferred
bounds, only a UU upper bound declared) for covariant type parameters,
revert back to minimising to Nothing rather than maximising to the
declared bound.

[Cherry-picked 43fc10c][modified]
Base automatically changed from backport-lts-3.3-20577 to lts-3.3 December 4, 2024 17:19
@WojciechMazur
Copy link
Contributor Author

No regressions detected in the community build up to backport-lts-3.3-21857.

Reference

@WojciechMazur WojciechMazur merged commit 3023607 into lts-3.3 Dec 4, 2024
19 checks passed
@WojciechMazur WojciechMazur deleted the backport-lts-3.3-21390 branch December 4, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants